<?php defined('SYSPATH') or die('No direct script access.');

/**
 * Enter description here...
 *
 * @package    	Kohadmin
 * @subpackage	Templates
 * @author     	Thomas Filius
 * @copyright  	(c) 2009 Nobis Stultius IT
 * @license		GNU Lesser General Public License 3
 * @version		$Id $
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title><?php echo html::specialchars($title) ?></title>
		<?php
			echo html::stylesheet(
				array
				(
					Kohana::config('kohadmin.kohadmin_path').'/assets/css/kohadmin_page',
					Kohana::config('kohadmin.kohadmin_path').'/assets/css/kohadmin_index',
					Kohana::config('kohadmin.kohadmin_path').'/assets/css/kohadmin_view',
					Kohana::config('kohadmin.kohadmin_path').'/assets/css/forms'
				),
				'screen');
			echo html::script(
				array
				(
					Kohana::config('kohadmin.kohadmin_path').'/assets/js/prototype-1.6.0.3',
					Kohana::config('kohadmin.kohadmin_path').'/assets/js/jquery-1.3.2.min',

					Kohana::config('kohadmin.kohadmin_path').'/assets/js/kohadmin_forms',
					Kohana::config('kohadmin.kohadmin_path').'/assets/js/kohadmin_init',

					Kohana::config('kohadmin.kohadmin_path').'/assets/js/jquery.tablesorter',
					Kohana::config('kohadmin.kohadmin_path').'/assets/js/jquery.metadata',
				)
			);
		?>
	</head>

	<body>
		<div id="headbg">&nbsp;</div>
		<div id="wrapper">
			<div id="options">&nbsp;</div>
			<div id="title"><?php echo Kohana::config('kohadmin.application_name')?></div>
			<div id="menu">
				<ul><?php
					foreach ($links as $link) {
						echo "<li>";
						if ($link != uri::segment(1)) {
							echo html::anchor($link, ucfirst(Kohana::lang("kohadmin.controllers.".$link)));
						} else {
							echo html::anchor($link, ucfirst(Kohana::lang("kohadmin.controllers.".$link)), array("class"=>"selected"));
						}
						echo "</li>";
					}
				?></ul>
			</div>

			<div id="right"><?php echo $blocks; ?></div>

			<div id="left">
				<div id="content">
					<h2><?php echo $title ?></h2>

					<?php echo $content; ?>

					<?php if (!empty($debug)) { ?>
						<div id="debug">
							<?=$debug?>
						</div>
					<?php } ?>
				</div>
			</div>
		</div>

	</body>
</html>
